package com.example.composetutorial

import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import androidx.compose.foundation.background
import androidx.compose.foundation.border
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.widthIn
import androidx.compose.material3.Text
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.platform.ComposeView
import androidx.compose.ui.unit.dp

class MainActivity2 : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main2)

        findViewById<ComposeView>(R.id.root1).setContent {
Box(modifier = Modifier.size(350.dp).widthIn(150.dp,350.dp)
    .background(Color.Green)

    .border(3.dp, Color.Red),Alignment.TopStart) {

    Column(Modifier.size(100.dp).border(3.dp,Color.Blue), horizontalAlignment = Alignment.CenterHorizontally){

        Text("text1" )
        Text("text2" )
        Text("text3" )
    }

}

}

    }
}